package com.example.consumer.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import com.example.consumer.service.OrderService;
import org.example.UserService;

/**
 * @author lijingyang
 * @Title:
 * @Package
 * @Description:
 * @date 2020/11/2518:18
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Reference//这里不能使用@Autowired注入bean，要使用dubbo中的注解@Reference注入bean和dubbo接口
    UserService userService;

    @Override
    public int initOrder(int a) {

        return userService.add(a);
    }
}